A common circuit found in signal processing applications is a peak detector. The function of a peak detector is to receive a time-varying input signal, such as a sinusoidal signal, a data pulse, etc., and detect and hold an output signal that is a DC signal proportional to the maximum or minimum value of the input signal.
Referring to FIG. 1, a conventional peak detector circuit 10 comprises an analog comparator 12 for comparing an input voltage Vi with a voltage Vh stored on a capacitor 14 that is coupled to an output terminal OUT of the peak detector circuit 10.
In the case of a positive peak detector, the input voltage Vi of an input signal IN is supplied to the non-inverting input terminal (+) of the comparator 12, whereas the capacitor voltage Vh is supplied to the inverting input terminal (−) of the comparator 12.
When the input voltage Vi exceeds the capacitor voltage Vh, the output of the comparator 12 transitions high, and turns ON a switching element 16 connected between a supply voltage Vdd and the capacitor 14, thereby coupling the supply voltage Vdd to the capacitor 14. As a result, the capacitor 14 can be charged by the current that flows through the switching element 16, and the capacitor voltage Vh can thus increase. When Vh reaches the positive peak value Vimax of the input voltage Vi, the output of the comparator 12 transitions low, and turns OFF the switching element 16, thereby decoupling the supply voltage Vdd from the capacitor 14. The capacitor 14 then ceases being charged and memorizes the capacitor voltage Vh at the positive peak value Vimax.
However, due to component mismatches, each comparator owns a unique inherent offset voltage Voff, namely the only voltage appearing at its input when the input terminals (+) and (−) are short-circuited. The output voltage Vout of the peak detector circuit 10 at the output terminal OUT will be thus affected by an error corresponding to the offset voltage Voff of the comparator 12, which is given by equation (1) as follows:Vout=Vimax+Voff
Thus, the accuracy of the peak detector circuit 10 suffers from the offset voltage Voff. As its magnitude is unique for each peak detector due to unique component mismatches, the offset voltage effects are not predictable and therefore difficult to compensate.
Peak detectors are widely used in integrated circuits, and in particular in Radio Frequency (RF) transceivers when they are tested using the Built-In Self-Test (BIST) technique or affected by the detection of unwanted high level bursts either in RF or Intermediate Frequency (IF). In such peak detectors, the conversion gain a between the output voltage Vout and the maximum amplitude Vimax of the input signal IN is an important parameter that is desired to be so high and accurate as possible. However, the accuracy of such peak detectors suffers not only from the offset voltage Voff, magnitude and polarity of which are unknown, but also from temperature, process or mismatch spreads.